package com.purchase.ml.exception;

public enum CommonEnum implements BaseErrorInfoInterface {
	// 数据操作错误定义
	SUCCESS("200", "Berjaya!"), 

	INSERT_ERROR("4001001","Gagal mencipta"),
	UPDATE_ERROR("4001002","Gagal mengedit"),
	UPDATE_ERROR_NOURL("4001012","Gagal mengedit, kurang logo"),
	DELETE_ERROR("4001003","Gagal membatal"),

	REGIST_CODE_ERROR("4001005","Kod dealer utama tidak wujud, sila cuba lagi "),

	ALREADY_EXIST_CATEGORY("4001006","Kategori telah wujud"),
	NO_EXIST_CATEGORY("4001007","Kategori tidak mengandungi produk"),
	NO_EXIST_DEALER("4001008","Dealer tidak wujud, sila tambah!"),
	NO_EXIST_PRODUCT("4001008","Produk tidak wujud, sila tambah!"),
	NO_EXIST_GATEGORY_ERROR("4001009","Sila periksa selapas membayar"),
	SUPER_EXIST_GATEGORY_ERROR("4001019","Tiada pesanan dari atasan"),
	ILLEGAL_INVITCODE("4001029","Kod jemputan telah wujud"),
	NUll_INVITCODE("4001039","Kod jemputan kosong"),
	NO_EXIST_PROD_ERROR("4001010","Tiada produk"),

	ILLEGAL_REQ_ERROR("4001011","Kesalahan request"),
	MAIL_SEND_ERROR("4001012","Gagal menghantar emel"),
	USER_MAIL_NO_EXIST_ERROR("4001013","Emel pengguna tidak wujud, sila periksa"),
	RESET_PWD_CODE_ERROR("4001014","Kod reset tidak sila periksa"),
	TWO_PWD_DIF_ERROR("4001015","Kata laluan tidak sama, sila periksa"),
	IMAGE_FILE_UPLOAD_ERROR("4001016","Gagal muat naik gambar"),
	IMAGE_FILE_UPLOAD_INDEX_IS_NULL("4001017","Indeks gambar tidak boleh kosong"),

	MASTER_DEALER_EXIST_DEALER("4001018","Dealer wujud, dilarang membatal!"),
	CATEGORY_EXIST_PRODUCT("4001019","Produk wujud, dilarang membatal!"),
	PRODUCT_EXIST_STOCK("4001020","Stok wujud, dilarang membatal!"),
	ILLEGAL_QULITY("4001021","Stok didak boleh kurang daripada MOQ!"),
	ORDER_PAID("4001022","Perintah telah dibayar dan tidak dapat dipadam"),
	;

	/** 错误码 */
	private String resultCode;

	/** 错误描述 */
	private String resultMsg;

	CommonEnum(String resultCode, String resultMsg) {
		this.resultCode = resultCode;
		this.resultMsg = resultMsg;
	}

	@Override
	public String getResultCode() {
		return resultCode;
	}

	@Override
	public String getResultMsg() {
		return resultMsg;
	}

}